<?php require_once('../../../Connections/microassur.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

mysql_select_db($database_microassur, $microassur);
$query_rs = "SELECT r1.* FROM rib r1 inner join role r2 on  r1.Identifiant_personne=r2.Identifiant_personne";
$rs = mysql_query($query_rs, $microassur) or die(mysql_error());
$row_rs = mysql_fetch_assoc($rs);
$totalRows_rs = mysql_num_rows($rs);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Document sans titre</title>
</head>

<body>
<table width="670" border="1" align="center">
  <tr>
    <td colspan="5">RIB DE LA PERSONNE</td>
    <td rowspan="5"><a href="saisierib1.php">Créer</a></td>
  </tr>
  <tr>
    <td>BANQUE</td>
    <td>GUICHET</td>
    <td>COMPTE</td>
    <td>CLE RIB</td><td></td>    
  </tr>
  <?php do { ?>
    <tr>
      <td><?php echo $row_rs['Code_banque_rib']; ?></td>
      <td><?php echo $row_rs['Code_guichet_rib']; ?></td>
      <td><?php echo $row_rs['Numero_compte_rib']; ?></td>
      <td><?php echo $row_rs['Cle_rib']; ?></td>
      <td><a href="rattacherrib.php?Identifiant_personne=<?php echo $row_rs['Identifiant_rib']; ?>">Rattacher</a></td>
    </tr>
    <?php } while ($row_rs = mysql_fetch_assoc($rs)); ?>
  <tr>
    <td colspan="4"><div align="center"><a href="../paiement/index.php">Retour</a></div></td>
  </tr>
</table>
</body>
</html>
<?php
mysql_free_result($rs);
?>
